#ifndef __LE__INCLUDED__
#define __LE__INCLUDED__

#include <iostream>

template <class type>
class LE {
	type* value;
	LE<type>*  next;
	LE<type>*  prev;

public:
	LE(type* value, LE* prev = NULL, LE* next = NULL) {
		this->value = value;
		this->next  = next;
		this->prev  = prev;
	}
	
	~LE() {
		// Mustn't do this command because in case of an reorganisation the elements are still needed.
		// Else the element would be deleted and the listelements would have invalid pointers.
		//delete this->value;
	}
	

	LE<type>* getPrev() {
		return prev;
	}

	LE<type>* getNext() {
	    
		return next;
	}
	
	type* getValue() {
		return value;
	}

	void setNext(LE<type>* next) {
		this->next = next;
	}

	void setPrev(LE<type>* prev) {
		this->prev = prev;
	}
};

#endif // __LE__INCLUDED__
